package com.yan.demo;

public class EnumDemo1 {
    public static void main(String[] args) {
        Student stu1 = new Student("jack" , Sex.男);
        Student stu2 = new Student("lisa", Sex.女);
        Student stu3 = new Student("tom", Sex.其他);
        Sex[] values = Sex.values();
        for (Sex value : values) {
            System.out.println(value);
            if(value instanceof Sex){
                System.out.println("true");
            }
        }
    }
}
